import request from '@/utils/request'

// 查询论坛小黑屋列表
export function listBlacklist(query) {
  return request({
    url: '/circle/blacklist/list',
    method: 'get',
    params: query
  })
}

// 查询论坛小黑屋详细
export function getBlack(uid) {
  return request({
    url: '/circle/blacklist/detail',
    method: 'get',
    params: {'uid': uid}
  })
}

export function getBlackUserInfo(id){
  return request({
    url: '/circle/blacklist/getById/' + id,
    method: 'get',
  })
}

// 新增论坛小黑屋
export function addBlacklist(data) {
  return request({
    url: '/circle/blacklist/add',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data' // Important: set correct content type
    }
  })
}


// 删除论坛小黑屋
export function delBlacklist(uid) {
  return request({
    url: '/circle/blacklist/release',
    method: 'post',
    data: {'uid': uid},
    headers: {
      'Content-Type': 'multipart/form-data' // Important: set correct content type
    }

  })
}
